package com.example.test;

import java.io.Serializable;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public class FanXing<T extends Serializable> {

	private Class<T> entityClass;
	@SuppressWarnings("all")
	public FanXing(){
		this.entityClass=null;
		Class c=getClass();
		Type t=c.getGenericSuperclass();
		if(t instanceof ParameterizedType){
			Type[] p=((ParameterizedType)t).getActualTypeArguments();
			this.entityClass=(Class<T>) p[0];
		}
	}
	
}
